package com.hava.contentsale.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpSession;

/**
 * Created by zhanpeng on 11/11/2016.
 * 当用户登出时，手动给session进行过期处理，并跳转到登录界面
 */
@Controller
public class LogoutController {

    @RequestMapping(value = "/logout")
    public String logout_view(HttpSession httpSession)
    {
        httpSession.invalidate();
        return "login";
    }
}
